package com.ruoyi.quartz.task;

import com.ruoyi.stock2.thread.*;
import com.ruoyi.stock2.utils.DateUtils2;
import org.springframework.stereotype.Component;

import com.ruoyi.common.utils.spring.SpringUtils;
import com.ruoyi.stock2.thread.aboutDownloadData.SaveToForetellResult;

/**
 * 定时任务调度测试
 *
 * @author stockTask
 */
@Component("stockTask")
public class StockTask {

	//下载交易数据
	public void downLoadTradeData() {
		DownLoadThread obj = DownLoadThread.getInstance();
		if(!obj.isWorking()){
			new Thread(obj).start();
		}else {

		}
	}
	//同步sinajs
	public void HqSinajsThread() {
		HqSinajsThread obj = HqSinajsThread.getInstance();
		if(!obj.isWorking()){
			new Thread(obj).start();
		}else {

		}
	}


	//以行业分组生成seq2seq时序训练集 并生成python seq2seq模型
	public void buildTrainseq2seqTextGroupByIndustryThread(String industry) {
		//小于2019-07-01年的生成完毕
		BuildSeq2SeqTrainTextGroupByIndustryThread obj = BuildSeq2SeqTrainTextGroupByIndustryThread.getInstance();
		obj.setIndustry(industry);
		if(!obj.isWorking()){
			System.out.println("new Thread(obj).start();");
			new Thread(obj).start();
		}else {
			System.out.println("new Thread(obj).start(); obj.isWorking()");
		}
	}


	//生成seq2seq时序训练集 并生成python seq2seq模型
	public void buildTrainseq2seqTextThread() {
		//小于2019-07-01年的生成完毕
		BuildSeq2SeqTrainTextThread obj = BuildSeq2SeqTrainTextThread.getInstance();
		if(!obj.isWorking()){
			System.out.println("new Thread(obj).start();");
			new Thread(obj).start();
		}else {
			System.out.println("new Thread(obj).start(); obj.isWorking()");
		}
	}

	//生成seq2seq时序预测集 调用seq2seq模型 生成预测图片
	public void buildPredseq2seqTextThread() {
		//小于2019-07-01年的生成完毕
		BuildSeq2SeqPredTextThread obj = BuildSeq2SeqPredTextThread.getInstance();
		if(!obj.isWorking()){
			System.out.println("new Thread(obj).start();");
			new Thread(obj).start();
		}else {
			System.out.println("new Thread(obj).start(); obj.isWorking()");
		}
	}

	//toTradeData200
	public void toTradeData200() {
		ToTradeData200 obj = ToTradeData200.getInstance();
		if(!obj.isWorking()){
			new Thread(obj).start();
		}else {

		}
	}

}
